﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SanTongSCX.aspx.cs" Inherits="Web.Pages.YongShui.SanTongSGL.SanTongSCX" Theme="Default" %>

<%@ Register Assembly="DevExpress.Web.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <script src="../../../../JS/AddEditCancel.js"></script>
    <script type="text/javascript">
        function rowClick() {
            var id = -1;
            if (gvList.GetFocusedRowIndex() != -1) {
                id = gvList.GetRowKey(gvList.GetFocusedRowIndex());
                hdCollection.Set("ID", id);
                ASPxCallback1.PerformCallback("info");
            }
            else {
                hdCollection.Set("ID", id);
            }
        }
        function ASPxCallback1Complete(rs) {
            loadpanel1.Hide();
            var arr = rs.split('|');
            var type = arr[0];
            var state = arr[1];
            var specialIdentity = arr[2];
            var msg = arr[3].split('-');
            if (msg[0] == 'True') {
                alert(msg[1]);
            }
            hdCollection.Set("type", type);
            if (state == 'True') {
                if (type == "info") {
                    //加载信息
                    txtYonghuh.SetText(arr[4]);
                    txtYonghum.SetValue(arr[5]);
                    txtDiZhi.SetValue(arr[6]);
                    txtPINGGUDW.SetText(arr[7]);
                    txtSHEJISL.SetText(arr[8]);
                    txtPingGuSL.SetText(arr[9]);
                    txtChaZhi.SetText(arr[10]);
                    txtZHONGSHUI.SetText(arr[11]);
                    txtYuShui.SetText(arr[12]);
                    if (arr[13] == 1) {
                        cbJianGuan.SetChecked(true);
                    }
                    else {
                        cbJianGuan.SetChecked(false);
                    }
                    txtRQ.SetText(arr[14]);
                }
            }
            else {

            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <div class="tabletitle1" align="center">
            三同时查询
        </div>
        <dx:ASPxHiddenField ID="hdCollection" ClientInstanceName="hdCollection" runat="server"></dx:ASPxHiddenField>
        <dx:ASPxCallback ID="ASPxCallback1" ClientInstanceName="ASPxCallback1" runat="server" OnCallback="ASPxCallback1_Callback" ClientSideEvents-CallbackComplete="function(s,e){ASPxCallback1Complete(e.result);}"></dx:ASPxCallback>
        <dx:ASPxLoadingPanel ID="ASPxLoadingPanel1" ClientInstanceName="loadpanel1" runat="server" ContainerElementID="gvList" Modal="true" Theme="Metropolis" ShowImage="false" Text="加载中"></dx:ASPxLoadingPanel>
        <asp:UpdatePanel ID="updatePanel1" runat="server">
            <ContentTemplate>
                <div class="top" style="width: 100%; margin: auto;">
                    <fieldset style="border: 1px solid  cornflowerblue; width: 97%; margin: auto;">
                        <legend style="font-weight: bold">查询条件</legend>
                        <table>
                            <tr>
                                <td style="text-align:right">用户号：</td>
                                <td>
                                    <dx:ASPxTextBox ID="contxtYongHuH" ClientInstanceName="contxtYongHuH" runat="server" Width="100%">
                                    </dx:ASPxTextBox>
                                </td>
                                <td></td>
                                <td style="text-align:right">用户名：</td>
                                <td colspan="4">
                                    <dx:ASPxTextBox ID="contxtYongHuM" ClientInstanceName="contxtYongHuM" runat="server" Width="100%">
                                    </dx:ASPxTextBox>
                                </td>
                                <td style="text-align:right;width:7%">地址：</td>
                                <td>

                                    <dx:ASPxTextBox ID="contxtDiZhi" ClientInstanceName="conDiZhi" runat="server" Width="100%">
                                    </dx:ASPxTextBox>
                                </td>

                            </tr>
                            <tr>
                                <td style="text-align: right;width:10%">设计水量：
                                </td>
                                <td style="width:10%">
                                    <dx:ASPxTextBox ID="contxtSheJiSL" ClientInstanceName="contxtSheJiSL" runat="server" Width="100%" ClientSideEvents-KeyUp="function(s,e){inputNum(s);}">
                                    </dx:ASPxTextBox>
                                </td>
                                <td style="width: 5%">（m³/d）</td>
                                <td style="text-align: right;width:10%">评估水量：
                                </td>
                                <td style="width:13%">
                                    <dx:ASPxTextBox ID="contxtPingGuSL" ClientInstanceName="contxtPingGuSL" runat="server" Width="100%" ClientSideEvents-KeyUp="function(s,e){inputNum(s); if( event.keyCode==13){btnSearch.onClick();}}" >
                                    </dx:ASPxTextBox>
                                </td>
                                <td style="width: 5%">（m³/d）</td>
                                <td style="text-align:right"  >
                                    <dx:ASPxLoadingPanel ID="LoadPanel" ClientInstanceName="LoadPanel" runat="server" Text="正在查询..."></dx:ASPxLoadingPanel>
                                    <dx:ASPxButton ID="btnSearch" ClientInstanceName="btnSearch" runat="server" Text="查询" UseSubmitBehavior="false" OnClick="btnSearch_Click">
                                        <ClientSideEvents Click="function(s, e) {  
                                                                        LoadPanel.Show();  
                                                                }" />
                                    </dx:ASPxButton>
                                </td>
                                <td colspan="2"></td>
                            </tr>
                        </table>

                    </fieldset>
                </div>

                <div style="height: 3px"></div>

                <fieldset style="border: 1px solid  cornflowerblue; width: 97%; margin: auto;">
                    <legend style="font-weight: bold">查询结果</legend>
                    <dx:ASPxGridView ID="gvSANTONGSHI" ClientInstanceName="gvList" runat="server" AutoGenerateColumns="False" KeyFieldName="ID" Theme="Aqua1" Width="100%">
                        <Columns>
                            <dx:GridViewDataTextColumn FieldName="NO" Caption="序号" Width="40px">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="S_YONGHUH" Caption="用户号" Width="70px">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="S_YONGHUM" Caption="用户名" Width="200px">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="S_DIZHI" Caption="地址" Width="250px">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="S_PINGGUDW" Caption="评估单位" Width="200px">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="I_SHEJISL" Caption="设计水量（m³/d）" Width="120px">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="I_PINGGUSL" Caption="评估水量（m³/d）" Width="120px">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="I_CHAZHI" Caption="差值（m³/d）" Width="120px">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="I_ZHONGSHUI" Caption="中水" Width="120px">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="I_YUSHUI" Caption="雨水" Width="120px">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="I_PILOUJG" Caption="纰漏监管" Width="70px" CellStyle-HorizontalAlign="Center">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="D_RIQI" Caption="日期" Width="130px">
                            </dx:GridViewDataTextColumn>
                        </Columns>
                        <Settings VerticalScrollableHeight="380" VerticalScrollBarMode="Auto" HorizontalScrollBarMode="Auto" />
                        <ClientSideEvents  Init="function(s,e){AdjustSize(350,gvList);}" FocusedRowChanged="function(s,e){rowClick();}"/>
                    </dx:ASPxGridView>
                    <hr />
                    <table style="width: 97%;margin:auto;">
                        <tr>
                            <td align="right">用户号：
                            </td>
                            <td>
                                <dx:ASPxTextBox ID="txtYonghuh" ClientInstanceName="txtYonghuh" ClientEnabled="false" runat="server" Width="100px">
                                </dx:ASPxTextBox>
                            </td>
                            <td colspan="7"></td>
                        </tr>
                        <tr>
                            <td align="right">用户名：
                            </td>
                            <td colspan="8">
                                <dx:ASPxTextBox ID="txtYonghum" ClientInstanceName="txtYonghum" ClientEnabled="false" runat="server" Width="98.5%"></dx:ASPxTextBox>
                            </td>
                            </tr>
                        <tr>
                            <td align="right">地址：
                            </td>
                            <td colspan="8">
                                <dx:ASPxTextBox ID="txtDiZhi" ClientInstanceName="txtDiZhi" ClientEnabled="false" runat="server" Width="98%"></dx:ASPxTextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">评估单位：
                            </td>
                            <td colspan="8">
                                <dx:ASPxTextBox ID="txtPINGGUDW" ClientInstanceName="txtPINGGUDW" ClientEnabled="false" runat="server" Width="98%"></dx:ASPxTextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" style="width: 10%">设计水量：
                            </td>
                            <td>
                                <dx:ASPxTextBox ID="txtSHEJISL" ClientInstanceName="txtSHEJISL" ClientEnabled="false" runat="server" Style="width: 100%;" HorizontalAlign="Right">                                  
                                </dx:ASPxTextBox>
                            </td>
                            <td style="width:5%">（m³/d）</td>
                            <td align="right" style="width: 10%">评估水量：
                            </td>
                            <td>
                                <dx:ASPxTextBox runat="server" ID="txtPingGuSL" ClientInstanceName="txtPingGuSL" ClientEnabled="false" type="text" Style="width: 100%;" HorizontalAlign="Right">
                                </dx:ASPxTextBox>
                            </td>
                            <td>（m³/d）</td>
                            <td align="right" style="width: 10%">差值：
                            </td>
                            <td>
                                <dx:ASPxTextBox runat="server" ID="txtChaZhi" ClientInstanceName="txtChaZhi" type="text"  ClientEnabled="false" Style="width: 100%;" HorizontalAlign="Right"></dx:ASPxTextBox>
                            </td>
                            <td style="width:5%">
                                （m³/d）
                            </td>
                        </tr>
                        <tr>
                            <td align="right">中水：
                            </td>
                            <td>
                                <dx:ASPxTextBox runat="server" ID="txtZHONGSHUI" ClientInstanceName="txtZHONGSHUI" ClientEnabled="false" type="text" Style="width: 100%;" HorizontalAlign="Right">
                                </dx:ASPxTextBox>
                            </td>
                            <td>
                               
                            </td>
                            <td align="right">雨水：
                            </td>
                            <td>
                                <dx:ASPxTextBox runat="server" ID="txtYuShui" ClientInstanceName="txtYuShui" ClientEnabled="false" type="text" Style="width: 100%;" HorizontalAlign="Right">
                                </dx:ASPxTextBox>
                            </td>
                            <td></td>
                            <td colspan="3">                                
                                <dx:ASPxCheckBox ID="cbJianGuan" runat="server" ClientInstanceName="cbJianGuan" ClientEnabled="false" Text="是否纰漏监管"></dx:ASPxCheckBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">日期：
                            </td>
                            <td>
                                <dx:ASPxTextBox runat="server" ID="txtRQ" ClientInstanceName="txtRQ" ClientEnabled="false" type="text" Style="width: 100%;" HorizontalAlign="Right">
                                </dx:ASPxTextBox>
                            </td>
                            <td colspan="7"></td>
                        </tr>
                    </table>
                </fieldset>
            </ContentTemplate>
        </asp:UpdatePanel>
    </form>
</body>
</html>


